package com.ztc.ZtcOrderTicket.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ztc.ZtcOrderTicket.bean.ZtcOrderTicket;
import com.ztc.ZtcOrderTicket.dao.ZtcOrderTicketDao;
@Service("ZtcOrderTicket")
public class ZtcOrderTicketManager{
    @Autowired
    ZtcOrderTicketDao ztcOrderTicketDao;
    public String save(ZtcOrderTicket ztcOrderTicket) {
    	return ztcOrderTicketDao.save(ztcOrderTicket);
	}
    public List<ZtcOrderTicket> getAll(){
    	List<ZtcOrderTicket> ztcOrderTickets=ztcOrderTicketDao.getAllZtcOrderTickets();
    	return ztcOrderTickets;
    }

    /**
     * 根据乘客姓名模糊查询订单票
     * @param passengerName 乘客姓名
     * @return 订单票集合
     */
    public List<ZtcOrderTicket> searchInfoLikes(String passengerName){
        List<ZtcOrderTicket> list= ztcOrderTicketDao.searchInfoLikes(passengerName);
        return list;
    }

    public List<ZtcOrderTicket> searchInfoEquals(ZtcOrderTicket ztcOrderTicket) {
    	return ztcOrderTicketDao.searchInfoEquals(ztcOrderTicket);
    }
    
    public String delete(ZtcOrderTicket ztcOrderTicket){
        return ztcOrderTicketDao.delete(ztcOrderTicket);
    }
    
    public String update(ZtcOrderTicket ztcOrderTicket){
        return ztcOrderTicketDao.update(ztcOrderTicket);
    }
}
